package pl.elka.pszt.controller.handler;

import pl.elka.pszt.controller.Controller;
import pl.elka.pszt.controller.event.BaseEvent;
import pl.elka.pszt.controller.event.view.ShowMessageEvent;

/**
 * 
 * @author Andrzej Makarewicz
 * 
 */
public class ShowMessageHandler extends BaseHandler {
	
	public ShowMessageHandler(final Controller controller) {
		super(controller);
	}
	
	@Override
	public void handleEvent(final BaseEvent event) {
		
		ShowMessageEvent messageEvent = (ShowMessageEvent) event;
		controller.getView().showMessageDialog(messageEvent.getMessage(), messageEvent.getType());
	}
	
}
